<script setup lang="ts">
import { useUserStore } from '@/store/user'
import { useMainStore } from '@/store/index'

const user = useUserStore()
const store = useMainStore()

</script>

<template>
  <div class="TabbarBtn">
    <el-tooltip
      class="box-item"
      effect="dark"
      content="用户"
      placement="left"
    >
    <div class="iconBox" @click="store.activeBtn==1?store.activeBtn=0:store.activeBtn=1">
      <img src="@/assets/image/user.png" alt="">
    </div>
    </el-tooltip>
    <div :class="store.activeBtn==1?'btnTooltip show':'btnTooltip'" >
      <span class="listBox" style="padding: 20px 10px;">
        <i @click="store.activeBtn=0" class="iconfont icon-cuo" style="position: absolute;right: 10px; top: 10px;cursor: pointer;"></i>
        <span class="tooltip">
            <div class="tooltip_box" @click="user.logout()">退出登陆</div>
          </span>
      </span>
    </div>
  </div>
</template>
